<template>
	<view class="app">
			<!-- 顶部栏 -->
			<!-- #ifndef MP -->
				<page-header :showFillView="false"></page-header>
				<mescroll-body
				ref="mescrollRef"
				@init="mescrollInit" 
				:top="headerHeight" 
				@down="downCallback" 
				:up="upOption" 
				@up="loadHotList" ></mescroll-body>
			<!-- #endif -->
			<!-- #ifdef MP -->
			<page-header :showFillView="true"></page-header>
			<!-- #endif -->
			<!-- 头部轮播图 -->
			<banner :list="carousel"></banner>
	</view>
</template>

<script>
	import tabbarMixin from './mixin/tabbar' 
	import homeMixin from './mixin/home'
	import pageHeader from './components/page-header.vue'
	import banner from './components/banner.vue'
	export default {
		components: {
			pageHeader,
			banner
		},
		mixins: [homeMixin, tabbarMixin],
		data() {
			return {
			}
		},
		computed:{
			
		},
		onLoad() {
			this.loadData()
		},
		methods: {
			
			loadData() {
				this.loadAdvert()
			},
			//加载广告 缓存10分钟
			async loadAdvert(){
				const res = await this.$request('advert', 'getAdvertList', {}, {
					cache: 10*60*0
				});
				console.log(res)
				this.advertList = res.data;
			},

		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
